var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
  for (var name in all)
    __defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
  if (from && typeof from === "object" || typeof from === "function") {
    for (let key of __getOwnPropNames(from))
      if (!__hasOwnProp.call(to, key) && key !== except)
        __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
  }
  return to;
};
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
  // If the importer is in node compatibility mode or this is not an ESM
  // file that has been converted to a CommonJS file using a Babel-
  // compatible transform (i.e. "__esModule" has not been set), then set
  // "default" to the CommonJS "module.exports" for node compatibility.
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
  mod
));
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);

// src/Result/index.tsx
var Result_exports = {};
__export(Result_exports, {
  default: () => Result
});
module.exports = __toCommonJS(Result_exports);
var import_antd = require("antd");
var import_style = require("antd/es/button/style/index.js");
var import_style2 = require("antd/es/result/style/index.js");
var import_classnames = __toESM(require("classnames"));
var import_react = __toESM(require("react"));
var import__ = __toESM(require("./imgs/403.png"));
var import__2 = __toESM(require("./imgs/404.png"));
var import__3 = __toESM(require("./imgs/500.png"));
var import_building = __toESM(require("./imgs/building.png"));
var import_network_error = __toESM(require("./imgs/network-error.png"));
var import_index = require("./index.less");
var imgs = [
  {
    code: "403",
    image: import__.default,
    title: "抱歉，您暂无访问权限",
    subTitle: "请联系管理员"
  },
  {
    code: "404",
    image: import__2.default,
    title: "抱歉，系统错误",
    subTitle: "请尝试清除缓存或联系管理员"
  },
  {
    code: "500",
    image: import__3.default,
    title: "抱歉，系统错误",
    subTitle: "请尝试清除缓存或联系管理员"
  },
  {
    code: "network-error",
    image: import_network_error.default,
    title: "网络错误",
    subTitle: "请检查网络连接是否正常"
  },
  {
    code: "building",
    image: import_building.default,
    title: "正在建设中",
    subTitle: "敬请期待"
  }
];
function Result({
  code,
  asPage = true,
  belong,
  manager,
  mobile,
  children,
  ...rest
}) {
  const found = imgs.find((img) => img.code === code);
  return /* @__PURE__ */ import_react.default.createElement(
    import_antd.Result,
    {
      icon: (found == null ? void 0 : found.image) ? /* @__PURE__ */ import_react.default.createElement("img", { src: found == null ? void 0 : found.image, title: found == null ? void 0 : found.title }) : void 0,
      title: found == null ? void 0 : found.title,
      subTitle: found == null ? void 0 : found.subTitle,
      extra: belong && manager && mobile ? /* @__PURE__ */ import_react.default.createElement("div", { className: "szzj-result-zzd-extra" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "szzj-result-zzd-extra-item" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "szzj-result-zzd-extra-item-label" }, "应用归属单位"), /* @__PURE__ */ import_react.default.createElement("div", { className: "szzj-result-zzd-extra-item-value" }, belong)), /* @__PURE__ */ import_react.default.createElement("div", { className: "szzj-result-zzd-extra-item" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "szzj-result-zzd-extra-item-label" }, "应用管理员"), /* @__PURE__ */ import_react.default.createElement("div", { className: "szzj-result-zzd-extra-item-value" }, manager)), /* @__PURE__ */ import_react.default.createElement("div", { className: "szzj-result-zzd-extra-item" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "szzj-result-zzd-extra-item-label" }, "联系方式"), /* @__PURE__ */ import_react.default.createElement("div", { className: "szzj-result-zzd-extra-item-value" }, mobile))) : null,
      ...rest,
      className: (0, import_classnames.default)("szzj-result", {
        page: !!asPage,
        [rest.className]: !!rest.className
      })
    },
    children
  );
}
